//
//  DatePickerView.swift
//  SwiftUI-CTao
//
//  Created by 涛 on 2019/9/17.
//  Copyright © 2019 涛. All rights reserved.
//

import SwiftUI

struct DatePickerView: View {
    
    static let globalFormat: DateFormatter = {
        let format = DateFormatter()
        format.dateFormat = "MM dd, yyyy"
        return format
    }()
    
    @State var birthDate = Date()
    
//    let closed = ClosedRange()
    
//    static let date: Date = {
//       let customDate = Date()
//        customDate
//    }()
    
    var body: some View {
        VStack {
            DatePicker(selection: $birthDate) {
                Text("描述")
            }
                            
        }
        
        
    }
}

struct DatePickerView_Previews: PreviewProvider {
    static var previews: some View {
        DatePickerView()
    }
}
